<!DOCTYPE html>
<html>
 <head> 
  <meta http-equiv="Content-Type" content="text/html" ;="" charset="utf-8" /> 
  <title>欢迎登陆</title> 
  <script src="https://cdn.staticfile.org/jquery/3.4.0/jquery.min.js"></script> 
  <script>
		$(document).ready(function(){
			$('#loginBtn').bind('click',function(){
				var password = $("[name='password']").val();
				var email = $("[name='email']").val();
	        	$.get("/api/user/login/"+email+"/"+password,function(data,status){
            		if (data == true){
            			window.location.href = "/static/welcome.html";
            		}else{
            			alert("登录失败");
            		}
        		});
			});


      $('#codeBtn').bind('click',function(){
            window.location.href = "/static/register.html";
      })
		});
	</script>
  <style type="text/css">
	body {text-align: center;} 
    #center { margin-right: auto; margin-left: auto; } 
  header{
		width: 35%;/*这是设置宽,100%的意思是撑满屏幕*/
		height: 35px;/*这是设置高*/
		background-color: black;/*这是header标签的背景颜色*/
		color: white;/*这是字体颜色*/
		text-align:center;/*这是文字居中*/
		line-height: 35px;
		}
	 input[type="text"],input[type="password"]{
		line-height: 48px;
		margin-top: 10px;
		width: 35%;
		}/*这是设置账号框和密码框的样式,具体的需要说的太多,
		嗯....,
		那就请你们动动你们的小手去百度搜一下叭*/
		input[type="button"]{
		width: 35%;
		margin-top: 10px;
	}
</style> 
 </head> 
 <body> 
  <div>
   用户登录
  </div> 
  <div> 
   <input type="text" name="email" placeholder="请输入邮箱..." /> 
  </div> 
  <div> 
   <input type="password" name="password" placeholder="请输入密码..." /> 
  </div> 
  <div> 
   <input id="loginBtn" type="button" value="登录" /> 
  </div>  
    <div> 
   <input id="codeBtn" type="button" value="注册账号" /> 
  </div>
 </body>
</html>